#ifndef __CLASSFIVE_H_
#define __CLASSFIVE_H_

#include <iostream>
#include <stdlib.h>
#include <string.h>
class AI;
class Chess;
class Player;
class Board
{
public:
    static Board *GetBoard(int size)
    {
        static Board b(size);
        return &b;
    }

    ~Board();
    void PrintBoard();
    bool IsValidPlace(int row, int column);

    friend class Player;
    friend class Chess;
    friend class AI;

private:
    Board(int size = 10);
    Board(const Board &b);
    void operator=(const Board &b);
    int size;
    char **board;
};
class Player
{
public:
    friend class AI;
    Player(char player);
    bool Makemove(Board *b, int row, int column, char player);
    bool CheckIsWin(Board *b, int row, int column, char player);
    bool CheckIsDraw(Board *b, Chess c);
    char Return()
    {
        return player;
    }

private:
    char player;
};
class Chess
{
public:
    Chess() : chess('-') {};

    friend class Board;
    friend class Player;

private:
    char chess;
};
class AI
{
public:
    bool MayWin(Board *b, int row, int column, char player);
    bool AIMakeMove(Board *b, char player, char ai, int playerRow, int playerColumn, Player p);

private:
};

#endif